package GameData;

import java.util.Scanner;
import java.io.File;
import java.io.FileNotFoundException;

public class GameParser {
	
	public static void parseGameData() throws FileNotFoundException
	{
		//Scanner sc = new Scanner(new File("./src/GameData/schedule.txt"));
		Scanner sc = new Scanner(new File("./GameData/schedule.txt"));
		while (sc.hasNextLine()) 
	    {
	    	String dateAll = sc.next(); //1
//	    	String date = (Games.monthConverter.get(Integer.parseInt(dateAll.substring(4,5))) + 
//	    			" " + dateAll.substring(6,7));
	    	String dayOfWeek = sc.next(); //2 stupid data
	    	dayOfWeek = sc.next(); //3
	    	String awayTeam = Games.teamNames.get(sc.next()); //4
	    	String homeTeam = sc.next(); //5 stupid data
	    	homeTeam = sc.next(); //6 stupid data
	    	homeTeam = Games.teamNames.get(sc.next()); //7
	    	String time = sc.next(); //8 stupid data
	    	time = sc.next(); //9 stupid data
	    	time = sc.next(); //10 = n or d
	    	time = (time.equals("d") ? "1:05" : "7:05");
	    	
	    	Games.games.add(new Game(awayTeam, homeTeam, dayOfWeek, 
	    			Integer.parseInt(dateAll.substring(4,6)), 
	    			Integer.parseInt(dateAll.substring(6,8)), time));
	    }
	}
}
